package com.secondHandPlatform.controller;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.secondHandPlatform.entity.Goods;
import com.secondHandPlatform.service.impl.GoodsServiceImpl;
import com.secondHandPlatform.Util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author team
 * @since 2023-05-18
 */
@RestController
@RequestMapping("/goods")
public class GoodsController {
    @Autowired
    private GoodsServiceImpl goodsService;

    @GetMapping("allGoods")
    public Result findAllGoods() {

        return new Result().success( goodsService.findAllGoods());
    }

}
